/**
 * 拦截器：统一处理 response status !== 200 的情况
 *
 * @type {Array}
 */

const errorHandlerInterceptor = [
    function(responseData) {
        const { status } = responseData;
        switch (status) {
            case 200:
                return responseData;
            case 403:
                return responseData;
            case 803:
                return responseData;
            default:
                return responseData;
        }
    },
    function(error) {
        return error;
    }
];

export default errorHandlerInterceptor;
